#ifndef GW_RESOURCE_H
#define GW_RESOURCE_H

#ifdef  __cplusplus
extern "C"
{
#endif

#include "cmsis_os.h"

#define  RELAY_1  0x01
#define  RELAY_2  0x02
#define  RELAY_3  0x04

#define  STATE_OK       0
#define  STATE_WARNLO   1
#define  STATE_WARNHI   2
#define  STATE_LINEOFF  3

#define  SWITCH_ON   0
#define  SWITCH_OFF  1
#define  SWITCH_MASK 2

#define  WARN_UP     0  
#define  WARN_DOWN   1
#define  WARN_PASS   2

extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim6;
extern IWDG_HandleTypeDef hiwdg;

extern UART_HandleTypeDef huart1;
extern DMA_HandleTypeDef hdma_usart1_rx;
extern DMA_HandleTypeDef hdma_usart1_tx;

extern osThreadId comTaskHandle;
extern osThreadId ioTaskHandle;
extern osThreadId watchTaskHandle;
extern osSemaphoreId comSemHandle;
extern osSemaphoreId inputSemHandle;

#ifdef  __cplusplus
}
#endif  /* end of __cplusplus */

#endif
